import request from "@/utils/request";

import type { LoginResponse, RegisterResponse } from "@/libcommon/modules/login";
import type { IUser_Login,IUser_Register } from "./type";

const enum API {
    Login = "/auth/login",
    Register = "/auth/register",
}

export const LoginService  = async (data: IUser_Login) => {
    return request.post<any,LoginResponse>(API.Login, data);
}

export const RegisterService = async (data: IUser_Register) => {
    return request.post<any,RegisterResponse>(API.Register, data);
}